package toanstt.com.menu;

import toanstt.com.MatchUp.App;
import toanstt.com.MatchUp.ButtonCenter;
import toanstt.com.MatchUp.MainActivity;
import toanstt.com.MatchUp.SCR;
import toanstt.com.MatchUp.Sound2;
import toanstt.com.MatchUp.T;
import android.graphics.Canvas;
import android.util.Log;
import android.view.MotionEvent;

public class HowTo 
{
	ButtonCenter[] buttons;
	public HowTo()
	{
		int i;
		buttons = new ButtonCenter[1];
		//for(i =0;i<5;i++)
			//buttons[i] = new ButtonCenter(T.TBITMAP_BUTTON_MENU.bitmap[i+9],T.DISPLAY_WIDTH/2,(int)((i+1)*4*T.U2));
		if(T.ISHORIZONTAL)
		{
			i = 4;
			if(T.DISPLAY_WIDTH < 400)
				buttons[0] = new ButtonCenter(T.TBITMAP_BUTTON_MENU.bitmap[13],T.DISPLAY_WIDTH/2,(int)(T.DISPLAY_HEIGHT - (int)(8*T.U2)));
			else
				buttons[0] = new ButtonCenter(T.TBITMAP_BUTTON_MENU.bitmap[13],T.DISPLAY_WIDTH/2,(int)(T.DISPLAY_HEIGHT -50- (int)(2*T.U2)));
		}
		else
		{
			i = 4;
			buttons[0] = new ButtonCenter(T.TBITMAP_BUTTON_MENU.bitmap[13],T.DISPLAY_WIDTH/2,(int)(T.DISPLAY_HEIGHT - (int)(5*T.U2)));
		}
	}
	int d;
	public void Draw(Canvas canvas)
	{
		/*if(T.THEME_WHITE == true)
			canvas.drawBitmap(T.TBITMAP_THEME_WHITE.bitmap[0], 0, 0, null);
		else
			canvas.drawBitmap(T.TBITMAP_THEME_BLACK.bitmap[0], 0, 0, null);
		*/		
		for(d =0;d<1;d++)
			buttons[d].Draw2(canvas);
	}
	int t;
	public void touch(MotionEvent mo)
	{
		Log.d("aaa","eeee");
		if(buttons[0].Kick(mo) == true)
		{
			T.sounds.Play(Sound2.BUTTON_CLICK);
			if(T.SCREEN_TEMP == -1)
			{
				T.SCREEN_TEMP = SCR.MENU;
				T.ALPHA =T.ALPHA_COUNT_MAX;
			}
		}
		
		 
		
		switch(App.action)
		{
			case MotionEvent.ACTION_DOWN:
				
			break;
			
			case MotionEvent.ACTION_UP:
				for(d =0;d<1;d++)
					buttons[d].anpla = 255;
			break;
			
			case MotionEvent.ACTION_MOVE:
			break;

		}
	}
}
